//
//  UseFoodCell.m
//  趣·美食
//
//  Created by dllo on 15/9/28.
//  Copyright (c) 2015年 金旭. All rights reserved.
//

#import "UseFoodCell.h"


@interface UseFoodCell ()

@property (nonatomic, strong) UILabel *nameLabel;
@property (nonatomic, strong) UILabel *amountLabel;
@property (nonatomic, assign) BOOL isnight;

@end

@implementation UseFoodCell



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        self.nameLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.nameLabel];
        
        
        self.amountLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.amountLabel];
        self.amountLabel.textAlignment = NSTextAlignmentRight;
        self.amountLabel.textColor = [UIColor lightGrayColor];
        

    }
    
    return self;
}


- (void)setCondiModel:(GFRecipeCondiModel *)condiModel {
    if (_condiModel != condiModel) {
        
        _condiModel = condiModel;
    }
    
    self.nameLabel.text = self.condiModel.name;
    self.amountLabel.text = self.condiModel.amount;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.nameLabel.frame = CGRectMake(ScreenWidth / 375.0 * 20, 0, ScreenWidth / 375.0 * 190, self.frame.size.height);
    
    self.amountLabel.frame = CGRectMake(ScreenWidth / 375.0 * 200, 0, ScreenWidth / 375.0 * 155, self.frame.size.height);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
